Optimal. Leaf size=32 \[ \frac {a (A+B) \tanh ^{-1}(\sin (c+d x))}{d}+a A x+\frac {a B \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3914, 3767, 8, 3770} \[ \frac {a (A+B) \tanh ^{-1}(\sin (c+d x))}{d}+a A x+\frac {a B \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3914
Rubi steps
\begin {align*} \int (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx &=a A x+(a B) \int \sec ^2(c+d x) \, dx+(a (A+B)) \int \sec (c+d x) \, dx\\ &=a A x+\frac {a (A+B) \tanh ^{-1}(\sin (c+d x))}{d}-\frac {(a B) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a A x+\frac {a (A+B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a B \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 43, normalized size = 1.34 \[ \frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+a A x+\frac {a B \tan (c+d x)}{d}+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 79, normalized size = 2.47 \[ \frac {2 \, A a d x \cos \left (d x + c\right ) + {\left (A + B\right )} a \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A + B\right )} a \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.41, size = 84, normalized size = 2.62 \[ \frac {{\left (d x + c\right )} A a + {\left (A a + B a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (A a + B a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.71, size = 65, normalized size = 2.03 \[ a A x +\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {A a c}{d}+\frac {a B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a B \tan \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 56, normalized size = 1.75 \[ \frac {{\left (d x + c\right )} A a + A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + B a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + B a \tan \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.23, size = 100, normalized size = 3.12 \[ \frac {B\,a\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 7.79, size = 71, normalized size = 2.22 \[ \begin {cases} \frac {A a \left (c + d x\right ) + A a \log {\left (\tan {\left (c + d x \right )} + \sec {\left (c + d x \right )} \right )} + B a \log {\left (\tan {\left (c + d x \right )} + \sec {\left (c + d x \right )} \right )} + B a \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (A + B \sec {\relax (c )}\right ) \left (a \sec {\relax (c )} + a\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________